package com.alili_tv.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 点赞表
 * </p>
 *
 * @author baomidou
 * @since 2023-03-17
 */
@Getter
@Setter
public class Likes implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 被点赞的评论或视频
     */
    private Long cvId;

    /**
     * 1：视频，0：评论
     */
    private Integer type;

    /**
     * 点赞者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 点赞最新时间
     */
    @TableField(exist = false)
    private LocalDateTime lastTime;

    /**
     * 点赞数量
     */
    @TableField(exist = false)
    private Integer likeCount;
}
